package a_obsolete;
import java.util.Date;

/**
 * User
 * Holds information and functions for a user of the system
 *
 *
 *  Date           	Name            	Action
 *  --------------------------------------------------------------------------------------
 *	03/10/11		Matt				Created Class
 *  03/15/11		Bethany				Edited Class
 *
 *
 */



public abstract class User {
	
	protected String username;
	protected String password;
	private String firstName;
	private String middleName;
	private String lastName;
	private String phone;
	private String email;
	private boolean sexMale;
	private Date dob;

	
	/**
	 * User Constructor taking in all fields
	 * @param username The user's username
	 * @param password The user's password
	 * @param firstName User's first name
	 * @param middleName User's middle name
	 * @param lastName User's last name
	 * @param phone User's phone number
	 * @param email User's e-mail address
	 * @param sexMale If the user is male
	 * @param dob User's date of birth
	 */
	public User(String username, String password, String firstName, String middleName, String lastName, String phone, String email, 
			boolean sexMale, Date dob){
		
		this.username = username; 
		this.password = password; 
		this.firstName = firstName;
		this.middleName = middleName;
		this.lastName = lastName;
		this.phone = phone;
		this.email = email;
		this.sexMale = sexMale;
		this.dob = dob;
		
	}
	
	/**
	 * Minimal User Constructor
	 * @param username The user's username
	 * @param password The user's password
	 */
	public User(String username, String password){
		this(username, password,"","","","","",false,null);
	}

	/**
	 * @return the username
	 */
	public String getUsername() {
		return username;
	}

	/**
	 * @param username the username to set
	 */
	public void setUsername(String username) {
		this.username = username;
	}

	/**
	 * @return the password
	 */
	public String getPassword() {
		return password;
	}

	/**
	 * @param password the password to set
	 */
	public void setPassword(String password) {
		this.password = password;
	}

	/**
	 * @return the firstName
	 */
	public String getFirstName() {
		return firstName;
	}

	/**
	 * @param firstName the firstName to set
	 */
	public void setFirstName(String firstName) {
		this.firstName = firstName;
	}

	/**
	 * @return the middleName
	 */
	public String getMiddleName() {
		return middleName;
	}

	/**
	 * @param middleName the middleName to set
	 */
	public void setMiddleName(String middleName) {
		this.middleName = middleName;
	}

	/**
	 * @return the lastName
	 */
	public String getLastName() {
		return lastName;
	}

	/**
	 * @param lastName the lastName to set
	 */
	public void setLastName(String lastName) {
		this.lastName = lastName;
	}

	/**
	 * @return the phone
	 */
	public String getPhone() {
		return phone;
	}

	/**
	 * @param phone the phone to set
	 */
	public void setPhone(String phone) {
		this.phone = phone;
	}

	/**
	 * @return the email
	 */
	public String getEmail() {
		return email;
	}

	/**
	 * @param email the email to set
	 */
	public void setEmail(String email) {
		this.email = email;
	}

	/**
	 * @return the genderMale
	 */
	public boolean isSexMale() {
		return sexMale;
	}

	/**
	 * @param sexMale the sexMale to set
	 */
	public void setSexMale(boolean sexMale) {
		this.sexMale = sexMale;
	}

	/**
	 * @return the dob
	 */
	public Date getDob() {
		return dob;
	}

	/**
	 * @param dob the dob to set
	 */
	public void setDob(Date dob) {
		this.dob = dob;
	}
	
	/**
	 * Gets the user's full name
	 * @return The user's full name
	 */
	public String getFullName(){
		throw new UnsupportedOperationException();
		// append firstName, middleName, and lastName
	}
	
	/**
	 * Gets the user's age
	 * @return The user's age
	 */
	public int getAge(){
		throw new UnsupportedOperationException();
		//calculate age based on dob
	}
	

}
